3.11.95 \(\int x^3 (A+B x) (a+b x+c x^2)^p \, dx\) [1095]

3.11.95.1 Optimal result
3.11.95.2 Mathematica [C] (verified)
3.11.95.3 Rubi [A] (verified)
3.11.95.4 Maple [F]
3.11.95.5 Fricas [F]
3.11.95.6 Sympy [F(-1)]
3.11.95.7 Maxima [F]
3.11.95.8 Giac [F]
3.11.95.9 Mupad [F(-1)]

3.11.95.1 Optimal result

Integrand size = 21, antiderivative size = 442 \[ \int x^3 (A+B x) \left (a+b x+c x^2\right )^p \, dx=-\frac {(b B (4+p)-A c (5+2 p)) x^2 \left (a+b x+c x^2\right )^{1+p}}{2 c^2 (2+p) (5+2 p)}+\frac {B x^3 \left (a+b x+c x^2\right )^{1+p}}{c (5+2 p)}+\frac {\left (2 a c (3+2 p) (b B (4+p)-A c (5+2 p))+b (2+p) \left (6 a B c (2+p)-b^2 B \left (12+7 p+p^2\right )+A b c \left (15+11 p+2 p^2\right )\right )-2 c (1+p) \left (6 a B c (2+p)-b^2 B \left (12+7 p+p^2\right )+A b c \left (15+11 p+2 p^2\right )\right ) x\right ) \left (a+b x+c x^2\right )^{1+p}}{4 c^4 (1+p) (2+p) (3+2 p) (5+2 p)}-\frac {2^{-1+p} \left (12 a^2 B c^2-12 a b^2 B c (3+p)+6 a A b c^2 (5+2 p)+b^4 B \left (12+7 p+p^2\right )-A b^3 c \left (15+11 p+2 p^2\right )\right ) \left (-\frac {b-\sqrt {b^2-4 a c}+2 c x}{\sqrt {b^2-4 a c}}\right )^{-1-p} \left (a+b x+c x^2\right )^{1+p} \operatorname {Hypergeometric2F1}\left (-p,1+p,2+p,\frac {b+\sqrt {b^2-4 a c}+2 c x}{2 \sqrt {b^2-4 a c}}\right )}{c^4 \sqrt {b^2-4 a c} (1+p) (3+2 p) (5+2 p)} \]

output
-1/2*(b*B*(4+p)-A*c*(5+2*p))*x^2*(c*x^2+b*x+a)^(p+1)/c^2/(2+p)/(5+2*p)+B*x 
^3*(c*x^2+b*x+a)^(p+1)/c/(5+2*p)+1/4*(2*a*c*(3+2*p)*(b*B*(4+p)-A*c*(5+2*p) 
)+b*(2+p)*(6*a*B*c*(2+p)-b^2*B*(p^2+7*p+12)+A*b*c*(2*p^2+11*p+15))-2*c*(p+ 
1)*(6*a*B*c*(2+p)-b^2*B*(p^2+7*p+12)+A*b*c*(2*p^2+11*p+15))*x)*(c*x^2+b*x+ 
a)^(p+1)/c^4/(4*p^4+28*p^3+71*p^2+77*p+30)-2^(-1+p)*(12*a^2*B*c^2-12*a*b^2 
*B*c*(3+p)+6*a*A*b*c^2*(5+2*p)+b^4*B*(p^2+7*p+12)-A*b^3*c*(2*p^2+11*p+15)) 
*(c*x^2+b*x+a)^(p+1)*hypergeom([-p, p+1],[2+p],1/2*(b+2*c*x+(-4*a*c+b^2)^( 
1/2))/(-4*a*c+b^2)^(1/2))*((-b-2*c*x+(-4*a*c+b^2)^(1/2))/(-4*a*c+b^2)^(1/2 
))^(-1-p)/c^4/(p+1)/(3+2*p)/(5+2*p)/(-4*a*c+b^2)^(1/2)
 
3.11.95.2 Mathematica [C] (verified)

Result contains higher order function than in optimal. Order 6 vs. order 5 in optimal.

Time = 0.77 (sec) , antiderivative size = 210, normalized size of antiderivative = 0.48 \[ \int x^3 (A+B x) \left (a+b x+c x^2\right )^p \, dx=\frac {1}{20} x^4 \left (\frac {b-\sqrt {b^2-4 a c}+2 c x}{b-\sqrt {b^2-4 a c}}\right )^{-p} \left (\frac {b+\sqrt {b^2-4 a c}+2 c x}{b+\sqrt {b^2-4 a c}}\right )^{-p} (a+x (b+c x))^p \left (5 A \operatorname {AppellF1}\left (4,-p,-p,5,-\frac {2 c x}{b+\sqrt {b^2-4 a c}},\frac {2 c x}{-b+\sqrt {b^2-4 a c}}\right )+4 B x \operatorname {AppellF1}\left (5,-p,-p,6,-\frac {2 c x}{b+\sqrt {b^2-4 a c}},\frac {2 c x}{-b+\sqrt {b^2-4 a c}}\right )\right ) \]

input
Integrate[x^3*(A + B*x)*(a + b*x + c*x^2)^p,x]
 
output
(x^4*(a + x*(b + c*x))^p*(5*A*AppellF1[4, -p, -p, 5, (-2*c*x)/(b + Sqrt[b^ 
2 - 4*a*c]), (2*c*x)/(-b + Sqrt[b^2 - 4*a*c])] + 4*B*x*AppellF1[5, -p, -p, 
 6, (-2*c*x)/(b + Sqrt[b^2 - 4*a*c]), (2*c*x)/(-b + Sqrt[b^2 - 4*a*c])]))/ 
(20*((b - Sqrt[b^2 - 4*a*c] + 2*c*x)/(b - Sqrt[b^2 - 4*a*c]))^p*((b + Sqrt 
[b^2 - 4*a*c] + 2*c*x)/(b + Sqrt[b^2 - 4*a*c]))^p)
 
3.11.95.3 Rubi [A] (verified)

Time = 0.71 (sec) , antiderivative size = 443, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {1236, 25, 1236, 25, 1225, 1096}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int x^3 (A+B x) \left (a+b x+c x^2\right )^p \, dx\)

\(\Big \downarrow \) 1236

\(\displaystyle \frac {\int -x^2 (3 a B+(b B (p+4)-A c (2 p+5)) x) \left (c x^2+b x+a\right )^pdx}{c (2 p+5)}+\frac {B x^3 \left (a+b x+c x^2\right )^{p+1}}{c (2 p+5)}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {B x^3 \left (a+b x+c x^2\right )^{p+1}}{c (2 p+5)}-\frac {\int x^2 (3 a B+(b B (p+4)-A c (2 p+5)) x) \left (c x^2+b x+a\right )^pdx}{c (2 p+5)}\)

\(\Big \downarrow \) 1236

\(\displaystyle \frac {B x^3 \left (a+b x+c x^2\right )^{p+1}}{c (2 p+5)}-\frac {\frac {\int -x \left (2 a (b B (p+4)-A c (2 p+5))-\left (-B \left (p^2+7 p+12\right ) b^2+A c \left (2 p^2+11 p+15\right ) b+6 a B c (p+2)\right ) x\right ) \left (c x^2+b x+a\right )^pdx}{2 c (p+2)}+\frac {x^2 \left (a+b x+c x^2\right )^{p+1} (b B (p+4)-A c (2 p+5))}{2 c (p+2)}}{c (2 p+5)}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {B x^3 \left (a+b x+c x^2\right )^{p+1}}{c (2 p+5)}-\frac {\frac {x^2 \left (a+b x+c x^2\right )^{p+1} (b B (p+4)-A c (2 p+5))}{2 c (p+2)}-\frac {\int x \left (2 a (b B (p+4)-A c (2 p+5))-\left (-B \left (p^2+7 p+12\right ) b^2+A c \left (2 p^2+11 p+15\right ) b+6 a B c (p+2)\right ) x\right ) \left (c x^2+b x+a\right )^pdx}{2 c (p+2)}}{c (2 p+5)}\)

\(\Big \downarrow \) 1225

\(\displaystyle \frac {B x^3 \left (a+b x+c x^2\right )^{p+1}}{c (2 p+5)}-\frac {\frac {x^2 \left (a+b x+c x^2\right )^{p+1} (b B (p+4)-A c (2 p+5))}{2 c (p+2)}-\frac {\frac {(p+2) \left (12 a^2 B c^2+6 a A b c^2 (2 p+5)-12 a b^2 B c (p+3)-A b^3 c \left (2 p^2+11 p+15\right )+b^4 B \left (p^2+7 p+12\right )\right ) \int \left (c x^2+b x+a\right )^pdx}{2 c^2 (2 p+3)}+\frac {\left (a+b x+c x^2\right )^{p+1} \left (-2 c (p+1) x \left (6 a B c (p+2)+A b c \left (2 p^2+11 p+15\right )+b^2 (-B) \left (p^2+7 p+12\right )\right )+b (p+2) \left (6 a B c (p+2)+A b c \left (2 p^2+11 p+15\right )+b^2 (-B) \left (p^2+7 p+12\right )\right )+2 a c (2 p+3) (b B (p+4)-A c (2 p+5))\right )}{2 c^2 (p+1) (2 p+3)}}{2 c (p+2)}}{c (2 p+5)}\)

\(\Big \downarrow \) 1096

\(\displaystyle \frac {B x^3 \left (a+b x+c x^2\right )^{p+1}}{c (2 p+5)}-\frac {\frac {x^2 \left (a+b x+c x^2\right )^{p+1} (b B (p+4)-A c (2 p+5))}{2 c (p+2)}-\frac {\frac {\left (a+b x+c x^2\right )^{p+1} \left (-2 c (p+1) x \left (6 a B c (p+2)+A b c \left (2 p^2+11 p+15\right )+b^2 (-B) \left (p^2+7 p+12\right )\right )+b (p+2) \left (6 a B c (p+2)+A b c \left (2 p^2+11 p+15\right )+b^2 (-B) \left (p^2+7 p+12\right )\right )+2 a c (2 p+3) (b B (p+4)-A c (2 p+5))\right )}{2 c^2 (p+1) (2 p+3)}-\frac {2^p (p+2) \left (-\frac {-\sqrt {b^2-4 a c}+b+2 c x}{\sqrt {b^2-4 a c}}\right )^{-p-1} \left (a+b x+c x^2\right )^{p+1} \left (12 a^2 B c^2+6 a A b c^2 (2 p+5)-12 a b^2 B c (p+3)-A b^3 c \left (2 p^2+11 p+15\right )+b^4 B \left (p^2+7 p+12\right )\right ) \operatorname {Hypergeometric2F1}\left (-p,p+1,p+2,\frac {b+2 c x+\sqrt {b^2-4 a c}}{2 \sqrt {b^2-4 a c}}\right )}{c^2 (p+1) (2 p+3) \sqrt {b^2-4 a c}}}{2 c (p+2)}}{c (2 p+5)}\)

input
Int[x^3*(A + B*x)*(a + b*x + c*x^2)^p,x]
 
output
(B*x^3*(a + b*x + c*x^2)^(1 + p))/(c*(5 + 2*p)) - (((b*B*(4 + p) - A*c*(5 
+ 2*p))*x^2*(a + b*x + c*x^2)^(1 + p))/(2*c*(2 + p)) - (((2*a*c*(3 + 2*p)* 
(b*B*(4 + p) - A*c*(5 + 2*p)) + b*(2 + p)*(6*a*B*c*(2 + p) - b^2*B*(12 + 7 
*p + p^2) + A*b*c*(15 + 11*p + 2*p^2)) - 2*c*(1 + p)*(6*a*B*c*(2 + p) - b^ 
2*B*(12 + 7*p + p^2) + A*b*c*(15 + 11*p + 2*p^2))*x)*(a + b*x + c*x^2)^(1 
+ p))/(2*c^2*(1 + p)*(3 + 2*p)) - (2^p*(2 + p)*(12*a^2*B*c^2 - 12*a*b^2*B* 
c*(3 + p) + 6*a*A*b*c^2*(5 + 2*p) + b^4*B*(12 + 7*p + p^2) - A*b^3*c*(15 + 
 11*p + 2*p^2))*(-((b - Sqrt[b^2 - 4*a*c] + 2*c*x)/Sqrt[b^2 - 4*a*c]))^(-1 
 - p)*(a + b*x + c*x^2)^(1 + p)*Hypergeometric2F1[-p, 1 + p, 2 + p, (b + S 
qrt[b^2 - 4*a*c] + 2*c*x)/(2*Sqrt[b^2 - 4*a*c])])/(c^2*Sqrt[b^2 - 4*a*c]*( 
1 + p)*(3 + 2*p)))/(2*c*(2 + p)))/(c*(5 + 2*p))
 

3.11.95.3.1 Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 1096
Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> With[{q = Rt[b^2 
 - 4*a*c, 2]}, Simp[(-(a + b*x + c*x^2)^(p + 1)/(q*(p + 1)*((q - b - 2*c*x) 
/(2*q))^(p + 1)))*Hypergeometric2F1[-p, p + 1, p + 2, (b + q + 2*c*x)/(2*q) 
], x]] /; FreeQ[{a, b, c, p}, x] &&  !IntegerQ[4*p] &&  !IntegerQ[3*p]
 

rule 1225
Int[((d_.) + (e_.)*(x_))*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*( 
x_)^2)^(p_), x_Symbol] :> Simp[(-(b*e*g*(p + 2) - c*(e*f + d*g)*(2*p + 3) - 
 2*c*e*g*(p + 1)*x))*((a + b*x + c*x^2)^(p + 1)/(2*c^2*(p + 1)*(2*p + 3))), 
 x] + Simp[(b^2*e*g*(p + 2) - 2*a*c*e*g + c*(2*c*d*f - b*(e*f + d*g))*(2*p 
+ 3))/(2*c^2*(2*p + 3))   Int[(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c 
, d, e, f, g, p}, x] &&  !LeQ[p, -1]
 

rule 1236
Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c 
_.)*(x_)^2)^(p_.), x_Symbol] :> Simp[g*(d + e*x)^m*((a + b*x + c*x^2)^(p + 
1)/(c*(m + 2*p + 2))), x] + Simp[1/(c*(m + 2*p + 2))   Int[(d + e*x)^(m - 1 
)*(a + b*x + c*x^2)^p*Simp[m*(c*d*f - a*e*g) + d*(2*c*f - b*g)*(p + 1) + (m 
*(c*e*f + c*d*g - b*e*g) + e*(p + 1)*(2*c*f - b*g))*x, x], x], x] /; FreeQ[ 
{a, b, c, d, e, f, g, p}, x] && GtQ[m, 0] && NeQ[m + 2*p + 2, 0] && (Intege 
rQ[m] || IntegerQ[p] || IntegersQ[2*m, 2*p]) &&  !(IGtQ[m, 0] && EqQ[f, 0])
 
3.11.95.4 Maple [F]

\[\int x^{3} \left (B x +A \right ) \left (c \,x^{2}+b x +a \right )^{p}d x\]

input
int(x^3*(B*x+A)*(c*x^2+b*x+a)^p,x)
 
output
int(x^3*(B*x+A)*(c*x^2+b*x+a)^p,x)
 
3.11.95.5 Fricas [F]

\[ \int x^3 (A+B x) \left (a+b x+c x^2\right )^p \, dx=\int { {\left (B x + A\right )} {\left (c x^{2} + b x + a\right )}^{p} x^{3} \,d x } \]

input
integrate(x^3*(B*x+A)*(c*x^2+b*x+a)^p,x, algorithm="fricas")
 
output
integral((B*x^4 + A*x^3)*(c*x^2 + b*x + a)^p, x)
 
3.11.95.6 Sympy [F(-1)]

Timed out. \[ \int x^3 (A+B x) \left (a+b x+c x^2\right )^p \, dx=\text {Timed out} \]

input
integrate(x**3*(B*x+A)*(c*x**2+b*x+a)**p,x)
 
output
Timed out
 
3.11.95.7 Maxima [F]

\[ \int x^3 (A+B x) \left (a+b x+c x^2\right )^p \, dx=\int { {\left (B x + A\right )} {\left (c x^{2} + b x + a\right )}^{p} x^{3} \,d x } \]

input
integrate(x^3*(B*x+A)*(c*x^2+b*x+a)^p,x, algorithm="maxima")
 
output
integrate((B*x + A)*(c*x^2 + b*x + a)^p*x^3, x)
 
3.11.95.8 Giac [F]

\[ \int x^3 (A+B x) \left (a+b x+c x^2\right )^p \, dx=\int { {\left (B x + A\right )} {\left (c x^{2} + b x + a\right )}^{p} x^{3} \,d x } \]

input
integrate(x^3*(B*x+A)*(c*x^2+b*x+a)^p,x, algorithm="giac")
 
output
integrate((B*x + A)*(c*x^2 + b*x + a)^p*x^3, x)
 
3.11.95.9 Mupad [F(-1)]

Timed out. \[ \int x^3 (A+B x) \left (a+b x+c x^2\right )^p \, dx=\int x^3\,\left (A+B\,x\right )\,{\left (c\,x^2+b\,x+a\right )}^p \,d x \]

input
int(x^3*(A + B*x)*(a + b*x + c*x^2)^p,x)
 
output
int(x^3*(A + B*x)*(a + b*x + c*x^2)^p, x)